#include <iostream>
using namespace std;
void fwyKaiMen(int n, bool a[], int fwy) {
	cout << "In fwyKaiMen" << endl;
	cout << "a:" << a << endl;
	cout << "&a:" << &a << endl;
	cout << "&a[0]:" << &a[0] << endl;
	cout << "a[0]:" << a[0] << endl;
	for (int i = 0; i < n; i++) {
		if ((i + 1) % fwy == 0) {
			a[i] = !a[i];
		}
	}
}

int main() {
	int n, fwy = 2;
	cin >> n;
	bool a[n];
	for (int i = 0; i < n; i++) {
		a[i] = true;
	}
	for (; fwy <= n; fwy++) {
		cout << "out of fwyKaiMen" << endl;
		cout << "a:" << a << endl;
		cout << "&a:" << &a << endl;
		cout << "&a[0]:" << &a[0] << endl;
		cout << "a[0]:" << a[0] << endl;

		fwyKaiMen(n, a, fwy);
	}
	for (int i = 0; i < n; i++) {
		if (a[i] == true) {
			cout << i + 1 << " ";
		}
	}
	return 0;
}
